package tools
{
	/**
	 * Contains some tools for URL treatment
	 */	
	public class PutIoUrlTools
	{		
		public static function buildAvStreamUrl(url:String, userAccessToken:String):String
		{
			/*
			
			Building Audio/Video Stream URLs
			
			Stream URLs contain a "user access token" which should be added dynamically by the client application. Here is the format:
			
			URL returned by API : "http://s01.put.io/stream-file/17/4701235/"
			User Access Token : "bebe56e6b3455440f90bf9dec14b7c6be814c7c0"
			
			Construct streaming url by adding "/atk/" string and user access token at the end of the returned URL. Final result:
			
			"http://s01.put.io/stream-file/17/4701235/atk/bebe56e6b3455440f90bf9dec14b7c6be814c7c0"
			
			*/				
			
			return url+'atk/'+userAccessToken;					
		}
	}
}